
template<typename T>
 void InsertSort(T* vec,size_t cnt)
 {
	 for (size_t j=1;j<cnt; j++)
	 {
		 T key0=vec[j];
		 int i;
		 for(i=j-1; i>=0;--i)
		 {
			 if(vec[i]>key0)
				 vec[i+1]=vec[i];
			 else
				 break;
		 }
		 vec[i+1]=key0;
	 }
 }
